<!DOCTYPE html>
<html>
	<head>
	<meta charset="utf-8" />
	<!--限制1：1不能缩放-->
	<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" id="viewport" name="viewport">
	<title>选择品牌</title>
	
	<script src="http://cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script>
	<script src="http://carnt.carnettong.com:8088/CARNT/js/cookie.js"></script>
		<!--bootstrap-->
	<link rel="stylesheet" type="text/css" href="./bootstrap.min.css"/>
	<script src="./bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
	<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm.min.css" class="">
	<link rel="stylesheet" type="text/css" href="./all.css"/>
	<link rel="stylesheet" type="text/css" href="./baoyang.css"/>
	<style>
	header h2 {
    color: white;
    font-size: 0.88em;
    margin-top: 10px;
    text-align: center;
}
header{height:40px;line-height:40px;}
body{
	overflow:scroll;
}
	</style>
	</head>
	
	<body data-spy="scroll" data-target="#myScrollspy">
		<div id="headers" style="background:#e42e3b"></div>
		<header style="background:#e42e3b;border-bottom:1px solid #EFEFEF;height:44px;line-height:44px;">
		  <a class="button button-link button-nav pull-left back" style="border:0;text-decoration: none;line-height:44px;font-size:0.8rem;color:#fff;height:44px;" href="javascript:;" id="goBacks">
            <span class="icon icon-left" style="color:#fff"></span>
             	选择品牌
          </a>
		</header>
		<div class="content carKind" >
			<div class="block">
				<h2 id="a">a</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="b">b</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="c">c</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="d">d</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="e">e</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="f">f</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="g">g</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="h">h</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="i">i</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="j">j</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="k">k</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="l">l</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="m">m</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="n">n</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="o">o</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="p">p</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="q">q</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="r">r</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="s">s</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="t">t</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="u">u</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="v">v</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="w">w</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="x">x</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="y">y</h2>
					<div class="row">
						
					</div>
			</div>
			<div class="block">
				<h2 id="z">z</h2>
					<div class="row">
						
					</div>
			</div>

		
		</div>
		<div class="myscrollspy">
		<ul class="wordLine" id="wordLine"data-spy="affix" data-offset-top="125">
			<li   class="active"><a href="#a">a</a></li>
			<li><a href="#b">b</a></li>
			<li><a href="#c">c</a></li>
			<li><a href="#d">d</a></li>
			<li><a href="#e">e</a></li>
			<li><a href="#f">f</a></li>
			<li><a href="#g">g</a></li>
			<li><a href="#h">h</a></li>
			<li><a href="#i">i</a></li>
			<li><a href="#j">j</a></li>
			<li><a href="#k">k</a></li>
			<li><a href="#l">l</a></li>
			<li><a href="#m">m</a></li>
			<li><a href="#n">n</a></li>
			<li><a href="#o">o</a></li>
			<li><a href="#p">p</a></li>
			<li><a href="#q">q</a></li>
			<li><a href="#r">r</a></li>
			<li><a href="#s">s</a></li>
			<li><a href="#t">t</a></li>
			<li><a href="#u">u</a></li>
			<li><a href="#v">v</a></li>
			<li><a href="#w">w</a></li>
			<li><a href="#x">x</a></li>
			<li><a href="#y">y</a></li>
			<li><a href="#z">z</a></li>
		</ul>
</div>	
<!--<input type="button" id="aa" value="data" />-->
<script src="./changeCode.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
   //var getIp = 'http://192.168.0.180:8088';// 双胜
   var getIp = 'http://carnt.carnettong.com:8088';// 线上
   var isIOSApp=sessionStorage.getItem("isIOSApp");
   if(isIOSApp){
		$("#headers").css("padding","10px");
   }else{
   		$("#headers").css("padding","0px");
   }
   
   $("#goBacks").on("click",function(){
        location.href='../award_record.html';
   })
   

   function toCarSet(carBrandId,carBrandName){
         window.location.href="./carSet.html?carBrandName="+carBrandName;
         setCookie('carBrandId',carBrandId);
         setCookie('carBrandName',carBrandName);
         
    }
    var imgUrl = "http://121.40.78.200/pic/carLogo/";
	$(function(){
			$.ajax({
			type:"get",
			dataType:"json",
			url:getIp+"/CARNT/CarBaseAction/carBrandList.action",
			success:function(data) {
				$.each(data,function(index,e) {
				    var carBrandId = data[index].carBrandId;
					var carBrandName=data[index].chnName;
					var icon=data[index].icon;
					var firstW=Pinyin.GetJP(carBrandName[0]);
					switch (firstW){
					case 'a':
						$("#a").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'b':
						$("#b").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'c':
						$("#c").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'd':
						$("#d").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'e':
						$("#e").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'f':
						$("#f").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'g':
						$("#g").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'h':
						$("#h").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'i':
						
						$("#i").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'j':
						$("#j").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'k':
						$("#k").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'l':
						$("#l").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'm':
						$("#m").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'n':
						$("#n").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'o':
						$("#o").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'p':
						$("#p").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'q':
						$("#q").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'r':
						$("#r").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 's':
						$("#s").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 't':
						$("#t").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'u':
						$("#u").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'v':
						$("#v").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'w':
						$("#w").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'x':
						$("#x").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'y':
						$("#y").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
					case 'z':
						$("#z").next(".row").append("<div class=\"col-xs-12\" onclick = \"toCarSet("+carBrandId+",'"+carBrandName+"')\"><img src=\""+imgUrl+icon+"\"  alt=\"\" /><p>"+carBrandName+"</p></div>").parents(".block").css('display','block')
						break;
				}

				})
		   }

		})
		$(".wordLine").css('height',$(window).height())
		$(".wordLine a").css('height',$(window).height()/26)
	})
</script>
	</body>
</html>
